package com.foeye.jaxrs2.client;

import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.Response;

public class JaxClient2 {

	private static final String REST_SERVICE_URL = "http://localhost:8080/resteasy";

	private static final String TITLE = "One big book";

	// private static final BigDecimal PRICE = new BigDecimal("20.0");
	// private static final GregorianCalendar PUBLISHED = new
	// GregorianCalendar(2013, 12, 24);

	public static void main(String[] args) {

		// getAllUser();
//		addUser();
		 getUser();

	}

	public static void getUser() {
		Client client = ClientBuilder.newClient();
		
        WebTarget target = client.target(REST_SERVICE_URL + "/user/get?id=123");
        Response response = target.request().get();
        String value = response.readEntity(String.class);
        System.out.println("value = " +  value);
        response.close(); 

		
		
		
	}

	public static void addUser() {

	}

	public static void getAllUser() {
	}

}
